#pragma once

#include <BWAPI.h>

#define DLLEXPORT	__declspec( dllexport )

class DLLEXPORT ZerglingState
{
	public:
		ZerglingState(int x, int y);
		int getX() {return _x;}
		int getY() {return _y;}
		void setXY(int x, int y) {_x=x; _y=y;}
		virtual void doAction(BWAPI::Unit* unit, int adjustX, int adjustY) {BWAPI::Broodwar->printf("Polymorphism trouble");};
		virtual int getDeltaX() {return 0;};
		virtual int getDeltaY() {return 0;};
	protected:
		int _x;
		int _y;
};

class ZerglingStateAttack : public ZerglingState
{
	public:
		ZerglingStateAttack(int x, int y, int x2, int y2, int deltaX, int deltaY): ZerglingState(x,y)
		{
			timer = 0;
			_x2=x2;
			_y2=y2;
			_deltaX = deltaX;
			_deltaY = deltaY;
		}
		void doAction(BWAPI::Unit *unit, int adjustX, int adjustY);
		int getDeltaX() { return _deltaX;}
		int getDeltaY() { return _deltaY;}
	private:
		int timer;
		int _x2, _y2;
		int _deltaX, _deltaY;
};

class ZerglingStateRetreat : public ZerglingState
{
	public:
		ZerglingStateRetreat(int x, int y): ZerglingState(x,y) {}
		void doAction(BWAPI::Unit *unit, int adjustX, int adjustY);
		int getDeltaX() {return 0;}
		int getDeltaY() {return 0;}
};